For this markdown document, I created several plotting functions, site assigned plots to variables, then printed them using ggarrange.
I've outlined the steps as headers.
For graphing with goem_line - if timestamps don't exist, the plot will draw a line connecting the data gap. To prevent that, we add in those time stamps and assign NA's to the parameter
To add colors to plots
Store each nutrient plot as a variable to print later.
There are three nutrient plotting functions in two chunks:
Use plotting function to store each plot as a variable to print later.
The first two chunks of code define plotting functions for pH and pH Flux. The last chunk finds the max pH value for each of the sites, and sets the x limits of the pH plots to be a short time around that, effectively zooming in on that value. Then, it uses the functions to store those plots as a variable for every site.
This chunk uses the tidyquant library to calculate daily pH summaries. That data is used in a pH flux plotting function.
This function provides the duration of exceedance of data below threshold, and tells you how many points in each exceedance event were below each division number. For example, if the pH exceeded 8.5, for that particual event, this function could give you the number of point (time) it was above 9, 9.5, and 10, not just 8.5.
Finally learned how to store plots in a list rather than name a variable for every single plot.
TP: 0.03 mg/L
Orthophosphate: 0.01 mg/L
TN: 3.0 mg/L
Nitrite: 0.01 mg/L
Nitrate: 3.0 mg/L
DO sat: 115%
Agricultural Land Use: >55%
Forest: <20%
Chl a/phaeopigment ratio: low ratio should indicate high algal senescence and potential decomposition